<?php
header('Content-Type:text/html;charset=UTF-8');
include 'lib/checker.php';

@$pid = $_REQUEST['pid'];
@$nid = $_REQUEST['nid'];

$title = '删除号码错误提示';
$jumpUrl = 'listPerson.php';

if(empty($pid)){
	$message = '获取联系人出错';
	include 'lib/message.php';
	die;
}

$jumpUrl = 'editPerson.php?pid='.$pid;

if(empty($nid)){
	$message = '获取号码信息出错';
	include 'lib/message.php';
	die;
}

require 'lib/db.php';

$flag = dbDelete('delete from number where id=:id',array('id'=>$nid));

if(!$flag){
	$message = '删除号码失败';
	include 'lib/message.php';
	die;
}

header('location:editPerson.php?pid='.$pid);

